import urllib.request
url='https://weibo.com/ajax/profile/info?uid=7992566678'
headers={
  # ":authority": "weibo.com",
  # ":method": "GET",
  # ":path": "/ajax/statuses/mymblog?uid=7992566678&page=1&feature=0",
  # ":scheme": "https",
  # "accept": "application/json, text/plain, */*",
  # # "accept-encoding": "gzip, deflate, br, zstd",
  # "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
  # "client-version": "v2.47.48",
  "cookie": "PC_TOKEN=1e644ea3a1; _s_tentry=passport.weibo.com; appkey=; Apache=5032808074763.26.1744094245911; SINAGLOBAL=5032808074763.26.1744094245911; ULV=1744094245925:1:1:1:5032808074763.26.1744094245911:; SCF=Aq5o_QM65FeHMVDaIwKCDzTaXowlgsQNVSR6mg08tNy3hwxyAfKvQJFh05NTLhUlsGAD0wKNOITlJHqlXHU1GDk.; SUB=_2A25K8LQoDeRhGeFH4lAU9ijKzDSIHXVpjEngrDV8PUNbmtAYLRStkW9Neh-gNyQR4nc2eNuggnuoAjelTf5Ft9pw; SUBP=0033WrSXqPxfM725Ws9jqgMF55529P9D9Whcek1iyXL_IB2A5sZTBFJh5NHD95QN1K.ESKqcSoMRWs4DqcjMi--NiK.Xi-2Ri--ciKnRi-zNS0.4eo-cSoqN15tt; ALF=02_1746686328; WBPSESS=JlxtNNE0nixh0JwFzk3h5mT1m6rhNsTEqnV7NljCh0K0VfcRF-rIr7U2RSkGa6ZVwZ0QG9xrFgIraKO4eFzBtSW9Skj55sg3kCusWKnGPoY0b5hgQKxasPQ_ZTqaXbL13zDHpZeLz---jzYu2WxifQ==",
  # "priority": "u=1, i",
  "referer": "https://weibo.com/u/7992566678",
  # "sec-ch-ua": "\"Chromium\";v=\"136\", \"Microsoft Edge\";v=\"136\", \"Not.A/Brand\";v=\"99\"",
  # "sec-ch-ua-mobile": "?0",
  # "sec-ch-ua-platform": "\"Windows\"",
  # "sec-fetch-dest": "empty",
  # "sec-fetch-mode": "cors",
  # "sec-fetch-site": "same-origin",
  # "server-version": "v2025.04.02.1",
  # "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0",
  # "x-requested-with": "XMLHttpRequest"
}
request=urllib.request.Request(url=url,headers=headers)
response=urllib.request.urlopen(request)
with open('微博.html','w',encoding='utf-8') as f:
    f.write(response.read().decode('utf-8'))